<?php

namespace Backend\Modules\Video\Models;
use Common\Models\Videos\HomeCategory as BaseHomeCategory;
class HomeCategory extends BaseHomeCategory
{
    public function afterSave()
    {
        if ($this->id) {
            $viewCache = $this->getDI()->getViewCache();
            $viewCache->delete('block-home-category-id-' . $this->id);
        }
    }

    public function afterDelete()
    {
        if ($this->id) {
            $viewCache = $this->getDI()->getViewCache();
            $viewCache->delete('block-home-category-id-' . $this->id);
        }
    }
}